
#ifndef _TLM_RMT_CFG_H
#define _TLM_RMT_CFG_H


#include "ssw_types.h"
#include "entITelematics_Def.h"

#define E_TLM_REMOTE_CONFIG_WEB_GEN_SPEED_THRESHOLD  0x20
#define E_TLM_REMOTE_CONFIG_WEB_FREE_SURF_STATUS  0x30
#define E_TLM_REMOTE_CONFIG_WEB_WEB_PORTAL_STATUS  0x38
#define E_TLM_REMOTE_CONFIG_WEB_WEB_PROTAL_SUB_STATUS  0x40
#define E_TLM_REMOTE_CONFIG_WEB_REMOTE_HMI_STATUS   0x48
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_TRAFFIC_INFO_STATUS   0x22
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_TRAFFIC_INFO_OVER_FM_STATUS   0x23
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_TRAFFIC_PERIOD   0x24
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_TRAFFIC_URL   0x25
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_LOCAL_SEARCH_STATUS   0x30
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_LOCAL_SEARCH_URL   0x31
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_WEATHER_STATUS   0x38
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_WEATHER_URL   0x39
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_PARKING_STATUS   0x40
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_PARKING_URL   0x41
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_STATION_STATUS   0x48
#define E_TLM_REMOTE_CONFIG_NAVI_ATT_STATION_URL   0x49
#define E_TLM_REMOTE_CONFIG_ADMIN_URL   0x20
#define E_TLM_REMOTE_CONFIG_ADMIN_SERVICE_VIN   0x21
#define E_TLM_REMOTE_CONFIG_ADMIN_REC_FILTER   0x22



#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_PROTOCOL_VERSION 0x01
#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_VIN  0x02
#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_ROUTE_INFO  0x03
#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_MSG_UNIQUE_ID  0x04
#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_SERVICE_TYPE   0x05
#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_MESSAGE_TYPE   0x06
#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_DATE_TIME      0x07
#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_MSG_PROTOCOL_VERSION   0x08
#define E_TELE_REMOTE_CONFIG_NGTP_HEADER_DATA_LENGTH            0x09
#define E_TELE_REMOTE_CONFIG_DATA_INFO_VIN 0x10
#define E_TELE_REMOTE_CONFIG_DATA_INFO_LANGUAGE 0x13
#define E_TELE_REMOTE_CONFIG_DATA_INFO_SW_VER 0x14
#define E_TELE_REMOTE_CONFIG_DATA_INFO_CONFIGURATION 0x10
#define E_TELE_REMOTE_CONFIG_DATA_INFO_STATUS 0x10  
#define E_TELE_REMOTE_CONFIG_DATA_INFO_REQ_SRV_ID_LIST  0x10     
#define E_TELE_REMOTE_CONFIG_DATA_INFO_SET_CFG_INFO  0x10



#define ESCAPE_CODE       0x7F
#define SEPERATE_LEVEL_1  0x7E
#define SEPERATE_LEVEL_2  0x7D
#define SEPERATE_LEVEL_3  0x7C
#define SEPERATE_LEVEL_4  0x7B
#define SEPERATE_LEVEL_5  0x7A


#define E_TLM_RMT_CFG_SERVICE_ID_WEB 4
#define E_TLM_RMT_CFG_SERVICE_ID_NAVI 5
#define E_TLM_RMT_CFG_SERVICE_ID_ADMIN 8  
#define TLM_MAX_BUFFER_SIZE 150 
#define TLM_VIN_FULL_LENGTH 17   
#define TLM_LANGUAGE_LENGTH 2  
#define TLM_SW_VER_LENGTH 8

#define TLM_MSG_TYPE_URL_BACK      3  
#define TLM_MSG_TYPE_PUSH_OBJ_POI       4  
#define TLM_MSG_TYPE_PUSH_OBJ_GUIDANCE       5  
#define TLM_MSG_TYPE_RMT_CFG_PENDING   27
#define TLM_MSG_TYPE_RMT_CFG_REQUEST   28
#define TLM_MSG_TYPE_RMT_CFG_CONNECT   29
#define TLM_MSG_TYPE_RMT_CFG_SET_PARA  30
#define TLM_MSG_TYPE_RMT_CFG_SEND_PARA 31
#define TLM_MSG_TYPE_RMT_CFG_ACK       32  

#define TLM_SRV_TYPE_REMOTE_CONFIG 0x12 

#define TLM_SRV_TYPE_INCOMING_TRAFFIC 0x13 

#define TLM_ACK_STATUS_OK 0
#define TLM_ACK_STATUS_KO 1
#define TLM_ACK_STATUS_OUTSIDE_LIMITS 2   

//#define MAX_CFG_URL_STRING_LENGTH 100
//#define MAX_SERVICE_VIN_LENGTH 17

//## type S_TLM_REMOTE_CFG_WEB_DATA
struct S_TLM_REMOTE_CFG_WEB_DATA {
    bool_t freeSurf;		//## attribute freeSurf
    bool_t webPortal;		//## attribute webPortal
    bool_t webPortalSubStatus;		//## attribute webPortalSubStatus
    bool_t rmtHmiStatus;		//## attribute rmtHmiStatus
    uint8_t speedThreshold;		//## attribute speedThreshold
};

//## type S_TLM_REMOTE_CFG_TRAFFIC
struct S_TLM_REMOTE_CFG_TRAFFIC {
    bool_t trafficInfoStatus;		//## attribute trafficInfoStatus
    bool_t trafficInfoOverFM;		//## attribute trafficInfoOverFM
    uint16_t trafficPeriod;		//## attribute trafficPeriod
    uint8_t trafficUrl[MAX_CFG_URL_STRING_LENGTH];		//## attribute trafficUrl
};

//## type S_TLM_REMOTE_CFG_WEATHER
struct S_TLM_REMOTE_CFG_WEATHER {
    bool_t weatherStatus;		//## attribute weatherStatus
    uint8_t weatherUrl[MAX_CFG_URL_STRING_LENGTH];		//## attribute weatherUrl
};

//## type S_TLM_REMOTE_CFG_LOCAL_SEARCH
struct S_TLM_REMOTE_CFG_LOCAL_SEARCH {
    bool_t localStatus;		//## attribute localStatus
    uint8_t localUrl[MAX_CFG_URL_STRING_LENGTH];		//## attribute localUrl
};

//## type S_TLM_REMOTE_CFG_PARKING
struct S_TLM_REMOTE_CFG_PARKING {
    bool_t parkingStatus;		//## attribute parkingStatus
    uint8_t parkingUrl[MAX_CFG_URL_STRING_LENGTH];		//## attribute parkingUrl
};

//## type S_TLM_REMOTE_CFG_GAS_STATION
struct S_TLM_REMOTE_CFG_GAS_STATION {
    bool_t stationStatus;		//## attribute stationStatus
    uint8_t stationUrl[MAX_CFG_URL_STRING_LENGTH];		//## attribute stationUrl
};

//## type S_TLM_REMOTE_CFG_ADMIN_DATA
struct S_TLM_REMOTE_CFG_ADMIN_DATA {
    uint8_t recFilter;		//## attribute recFilter
    uint8_t serviceVin[MAX_SERVICE_VIN_LENGTH];		//## attribute serviceVin
    uint8_t adminUrl [MAX_CFG_URL_STRING_LENGTH];		//## attribute adminUrl
};

//#[ type de_tlmErgID
#define    ERG_DPCA_TLM_REMOTECFG_ADMIN            0   
#define    ERG_DPCA_NAVI_REMOTECFG_LOCALSEARCH      1
#define    ERG_DPCA_NAVI_REMOTECFG_PARKING          2  
#define    ERG_DPCA_NAVI_REMOTECFG_WEATHER          3
#define    ERG_DPCA_NAVI_REMOTECFG_GASSTATION       4
#define    ERG_DPCA_NAVI_REMOTECFG_TRAFFIC          5 
#define    ERG_DPCA_TLM_REMOTECFG_WEB              6 
//#]


#endif
